import csv

file_path = "data/20240731/sh/600000/order.csv"  # 请替换为你的实际路径

filtered_rows = []

with open(file_path, newline='') as csvfile:
    reader = csv.DictReader(csvfile)
    headers = reader.fieldnames
    for row in reader:
        quantity = int(row["quantity"].strip(','))
        time = int(row["time"])
        if quantity  % 100 == 0 and time >= 93000000:
            filtered_rows.append(row)

# 写回原文件（覆盖）
with open(file_path, 'w', newline='') as csvfile:
    writer = csv.DictWriter(csvfile, fieldnames=headers)
    writer.writeheader()
    writer.writerows(filtered_rows)
